function fv=boundary1(y2r0,yir0,frac)
%*********************************************
%** This is a supporting function for ML2.m **
%** Created by Min-Hua Huang, Jan 25, 2012  **
%** y2r0: grandmu and sd                    **
%** yir0: groupmu and sd                    **
%** frac: rescaled parameter eta            **
%** output: adjusted boundary               **
%*********************************************
maxty2=max((yir0(:,1)-y2r0(1))/y2r0(2));
minty2=min((yir0(:,1)-y2r0(1))/y2r0(2));
distmax=y2r0(1)+maxty2*frac*y2r0(2);
distmin=y2r0(1)+minty2*frac*y2r0(2);
fv=[distmax;distmin];
